package hpu.e4_demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import hpu.e4_demo.entity.TRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 角色类型表 Mapper 接口
 * </p>
 *
 * @author FFF
 * @since 2025-06-21
 */
@Mapper
public interface TRoleMapper extends BaseMapper<TRole> {

    @Select("select * from t_role ")
    IPage<TRole> findAll(IPage<TRole> page);

    @Update("update t_role set role = #{role} where id = #{id}")
    Integer UpdateById(Integer id, String role);
}
